function fn1(x: number, y: number): number {
  return x + y
}

function fn2(x: number, y: number): number {
  return x + y
}



interface IFunc {
  (x: number, y: number): number
}


let fn: IFunc = function(a: number, b: number): number {
  return a + b
}

interface IEventFunc {
  (e: MouseEvent): void
}

function on(el: HTMLElement, evname: string, callback: IEventFunc) {

}

let div = document.querySelector('div')
if (div) {
  on(div, 'click', function(e) {
    e.clientX
  })
}



//接口合并
interface Box {
  height: number;
  width: number
}


interface Box {
  scale: number;
}

let box: Box = {
  height: 5,
  width: 5,
  scale: 5
}

//方法重载  统一方法会被重载
